create table javabox_friends(
	no number primary key,
	myid varchar2(50) not null,
	friend varchar2(50) not null
)

drop table javabox_friends

drop sequence javabox_friends_sql;
create sequence javabox_friends_sql nocache;

select no, myid, friend from javabox_friends;

update JAVABOX_MEMBER set point=1000 where id='java'

insert into javabox_friends
values(javabox_friends_sql.nextval, 'java', '1234');

insert into javabox_friends
values(javabox_friends_sql.nextval, 'java', '3333');

--select no, myid, friend
select m.id, m.name, m.email, m.grade, f.myid 
from javabox_friends f, JAVABOX_MEMBER m 
where f.friend=m.id and f.myid='java' 
--myid='java'; 









SELECT *
		FROM 
		( SELECT *
           FROM JAVABOX_MEMBER
           ORDER BY DBMS_RANDOM.RANDOM()
    	)WHERE ROWNUM <=5
